<?php

//===============================
// Center

switch($option) {
   case "multiAction": {
            multiActionNews();
            $class_news_list = 'class="active"';
            include "newsletter_list.php";
            break;
	}case "sendMail": {
			if(isset($_REQUEST['submitFrmSendNewsletter']) && trim($_REQUEST['submitFrmSendNewsletter'])!=''){
				$content = $_REQUEST['content'];
				$subject = $_REQUEST['subject'];
				$mails = getNewsletterToSend();
				include SITE_BASE_DIR.'/sendmail/class.phpmailer.php';
				ini_set('max_execution_time', 300);//second
				while($rs=$db->fetch_array($mails)) {
					sendNewsletter($rs['email'],$subject,$content);
				}
				ini_set('max_execution_time', 60);//second
			}
            $class_newsletter_sendMail = 'class="active"';
            include "send_newsletter.php";
            break;
   }default        : {
            $class_news_list = 'class="active"';
            include "newsletter_list.php";
            break;
        }
}
?>